import request from '../utils/request'

export function getVideoModerationList(param) {
    return request({
        url: '/video/getVideoList',
        method: 'get',
        params: {
            pageNum: param.pageNum,
            pageSize: param.pageSize
        }
    })
}

export function getVideoDetail(id) {
    return request({
        url: '/video/getVideoDetail',
        method: 'get',
        params: {
            videoId: id
        }
    })
}

export function moderateVideo(uid, vid, isPass, reason) {
    return request({
        url: '/video/moderate',
        method: 'post',
        data: JSON.stringify({
            userId: Number(uid),
            videoId: String(vid),
            isPass: isPass ? 1 : 0,
            reason: reason
        })
    })
}